﻿<Window x:Class="ejpClient.ejpWindows.EjsCourseRegistrationWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ejs="clr-namespace:ejpClient.ejpWindows"
    Title="コース登録"
    ResizeMode="NoResize" WindowStyle="ToolWindow" WindowStartupLocation="CenterOwner"
	Width="600" Height="590">
    <Window.Background>
        <ImageBrush Stretch="None" TileMode="Tile" Viewport="0,0,20,20" ViewportUnits="Absolute" 
                           ImageSource="pack://application:,,,/imgData/bgtile.png" />
    </Window.Background>
    <Window.Resources>
        <ejs:ObservableCourseList x:Key="CourseList"/>
    </Window.Resources>
    <Grid x:Name="LayoutRoot" Margin="15,15,15,15">
        <Rectangle Stroke="{x:Null}" Margin="0,0,0,0" RadiusX="15.5" RadiusY="15.5">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Color="#FF7FB2F0" Offset="0"/>
                    <GradientStop Color="#FFFAFAFA" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="#FFFFFFFF" Stroke="#FF7FB2F0" Margin="10,16,10,16" RadiusX="13.5" RadiusY="13.5"/>
        <Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Margin="8,16,12,16" 
                DataContext="{Binding Path=SelectedValue, ElementName=_lv_Courses, Mode=Default}">
            <Button Width="79" Height="22" Content="閉じる" Canvas.Left="437" Canvas.Top="453" Click="On_BtnCancelClick"/>
            <TextBlock Width="Auto" Height="Auto" TextWrapping="Wrap" Text="ログイン：" Canvas.Left="345" Canvas.Top="8" FontSize="10"/>
            <TextBlock Width="Auto" Height="Auto" TextWrapping="Wrap" Text="" x:Name="_tb_LoginName" Canvas.Left="399" Canvas.Top="8" FontSize="10"/>
            <ListView x:Name="_lv_Courses" Width="518" Height="407" Canvas.Left="11" Canvas.Top="33" IsSynchronizedWithCurrentItem="True"
                      ItemsSource="{StaticResource CourseList}">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Width="180" DisplayMemberBinding="{Binding _name}" Header="コース名"/>
                        <GridViewColumn Width="180" DisplayMemberBinding="{Binding _description}" Header="コース説明"/>
                        <GridViewColumn Width="180" DisplayMemberBinding="{Binding _owner}" Header="担当教師"/>
                    </GridView>
                </ListView.View>
            </ListView>
            <Button Canvas.Left="291" Canvas.Top="453" Click="On_BtnRegisterNewClick" Height="22" Width="133">新規コース登録</Button>
        </Canvas>
    </Grid>
</Window>
